package com.hrt.datasender.datadao.model;

import java.util.Date;

import com.btcode.db.fieldtype.FieldType;
import com.btcode.orm.model.BaseModel;
import com.btcode.orm.model.Field;
import com.btcode.orm.model.IField;

public class BcDevicesModel extends BaseModel {

    private static final long serialVersionUID = 1L;

    public static String tableName = "BC_DEVICES";

    public static IField id = new Field(BcDevicesModel.class, "ID", FieldType.String, true);

    public static IField comNum = new Field(BcDevicesModel.class, "COM_NUM", FieldType.String, false);

    public static IField deviceNum = new Field(BcDevicesModel.class, "DEVICE_NUM", FieldType.String, false);

    public static IField deviceName = new Field(BcDevicesModel.class, "DEVICE_NAME", FieldType.String, false);

    public static IField protocolId = new Field(BcDevicesModel.class, "PROTOCOL_ID", FieldType.String, false);

    public static IField parity = new Field(BcDevicesModel.class, "PARITY", FieldType.String, false);

    public static IField dataBit = new Field(BcDevicesModel.class, "DATA_BIT", FieldType.String, false);

    public static IField baudRate = new Field(BcDevicesModel.class, "BAUD_RATE", FieldType.String, false);

    public static IField stopBit = new Field(BcDevicesModel.class, "STOP_BIT", FieldType.String, false);

    public static IField createtime = new Field(BcDevicesModel.class, "CREATETIME", FieldType.DateTime, false);

    public static IField createtimeText = new Field(BcDevicesModel.class, "CREATETIME_TEXT", FieldType.String, false);

    public static IField readStart = new Field(BcDevicesModel.class, "READ_START", FieldType.Integer, false);

    public static IField readLength = new Field(BcDevicesModel.class, "READ_LENGTH", FieldType.Integer, false);

    public void setId(String value) {
        setFieldValue(id.getFieldName(), value);
    }

    public String getId() {
        Object value = getFieldValue(BcDevicesModel.id.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setComNum(String value) {
        setFieldValue(comNum.getFieldName(), value);
    }

    public String getComNum() {
        Object value = getFieldValue(BcDevicesModel.comNum.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDeviceNum(String value) {
        setFieldValue(deviceNum.getFieldName(), value);
    }

    public String getDeviceNum() {
        Object value = getFieldValue(BcDevicesModel.deviceNum.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDeviceName(String value) {
        setFieldValue(deviceName.getFieldName(), value);
    }

    public String getDeviceName() {
        Object value = getFieldValue(BcDevicesModel.deviceName.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setProtocolId(String value) {
        setFieldValue(protocolId.getFieldName(), value);
    }

    public String getProtocolId() {
        Object value = getFieldValue(BcDevicesModel.protocolId.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setParity(String value) {
        setFieldValue(parity.getFieldName(), value);
    }

    public String getParity() {
        Object value = getFieldValue(BcDevicesModel.parity.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDataBit(String value) {
        setFieldValue(dataBit.getFieldName(), value);
    }

    public String getDataBit() {
        Object value = getFieldValue(BcDevicesModel.dataBit.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setBaudRate(String value) {
        setFieldValue(baudRate.getFieldName(), value);
    }

    public String getBaudRate() {
        Object value = getFieldValue(BcDevicesModel.baudRate.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setStopBit(String value) {
        setFieldValue(stopBit.getFieldName(), value);
    }

    public String getStopBit() {
        Object value = getFieldValue(BcDevicesModel.stopBit.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setCreatetime(Date value) {
        setFieldValue(createtime.getFieldName(), value);
    }

    public Date getCreatetime() {
        Object value = getFieldValue(BcDevicesModel.createtime.getFieldName());
        Date result = getValueConver().converToDate(value);
        return result;
    }

    public void setCreatetimeText(String value) {
        setFieldValue(createtimeText.getFieldName(), value);
    }

    public String getCreatetimeText() {
        Object value = getFieldValue(BcDevicesModel.createtimeText.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setReadStart(Integer value) {
        setFieldValue(readStart.getFieldName(), value);
    }

    public Integer getReadStart() {
        Object value = getFieldValue(BcDevicesModel.readStart.getFieldName());
        Integer result = getValueConver().converToInteger(value);
        return result;
    }

    public void setReadLength(Integer value) {
        setFieldValue(readLength.getFieldName(), value);
    }

    public Integer getReadLength() {
        Object value = getFieldValue(BcDevicesModel.readLength.getFieldName());
        Integer result = getValueConver().converToInteger(value);
        return result;
    }

    public String getTableName() {
        return tableName;
    }

    public boolean isNeedCache() {
        return false;
    }

}